<template>
	<div id="app">

		<router-view/>

	</div>
</template>

<script>
	import homeapi from '@/api/api.js'
    import until  from '@/api/until';
	export default {
        name: 'code',
		data(){
			return {
			
			}
		},
		mounted(){
			let token=until.getCookie("token");
			
			
			if(token){
				this.getUserInfo();
				
			}
			
			
		},
        components: {
            
        },
		methods:{
			async getUserInfo(){
			
				let data=await homeapi.getUserinfo();

				if(data.code==402){
					this.$message.error("请先注册账号")
					this.$router.push("/login/loginnew")
                    until.setCookie("token","")
				}
				if(data.code==403){
                    this.$message.error("请先注册账号")
					this.$router.push("/login/loginnew")
                    until.setCookie("token","")
					
				}
				if(data.code==405){
                
					this.$router.push("/login/loginnew")
                    until.setCookie("token","")
					
				}
				if(data.code==200){
		
					this.$root.userInfo=data.result
					setTimeout(()=>{
						this.getUserInfo(0);
					},3000000)
			
					
				}
				
			}
		}
    }
</script>

<style lang="less">
@import "@/assets/lpyp.min.css";
body{
	font-size: 16px;
    color: #111111;
}
*{
	padding: 0;
	margin: 0;
}
#app {
	background: #F8F8F8;
	width: 100%;
	height: calc(100vh - 60px);
	font-size: 14px;
}
.el-input__inner{
	border-color: #ccc !important;
}
::-webkit-input-placeholder { /* WebKit browsers */
    color: #999 !important;;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
    color: #999 !important;;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: #999 !important;;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
    color: #999 !important;;
}
.el-cascader-menu__wrap{
	height: 400px !important;
}
.el-cascader-menu{
	min-width: 280px !important;
}
::-webkit-outer-spin-button,
::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

no-spinner {
-moz-appearance: textfield;
}
.w-e-hover-bar {
    display: none !important;
}
.w-e-text-container p{
	line-height: 2.0 !important;
}
textarea{
	line-height: 2.0 !important;
}
.demand p{
	line-height: 2.0 !important;
}

.add_div {
        width: 0.8533rem;
        height: 2.0513rem;
        background: #FF7923;
        box-shadow: 0px 0.0256rem 0.0513rem 0px rgba(0,0,0,0.16);
        border-radius: 0px 0px 0px 0.2051rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: fixed;
        right: 0;
        bottom: 2.2013rem;
    }
    .add_div .iconfont{
        font-size: 0.4103rem;
        color: #FFFFFF;
    }
    .add_div span{
        font-size: 0.359rem;
        color: #ffffff;
    }
    .bb_div{
        width: 0.8533rem;
        height: 4.2667rem;
        position: fixed;
        right: 0;
        bottom: 4.2667rem;
        background: #1CAF48;
        border-radius: 16px 0px 0px 0px;
        z-index: 99;
    }
    .bbd_top{
        width: 0.8533rem;
        height: 2.1333rem;
        background: #1CAF48;
        box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.16);
        border-radius: 16px 0px 0px 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    .bbd_top .iconfont{
        font-size: 0.3733rem;
        color: #FFFFFF;
    }
    .bbd_top span{
        font-size: 0.3733rem;
        line-height: 0.56rem;
        color: #FFFFFF;
    
    }
	.upload_input{
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		opacity: 0;
	}
    .select_input{
        width: 100%;
        height: 30px;
        border: 1px solid #DCDFE6;
        border-radius: 4px;
        background: #FFFFFF;
        cursor: pointer;
        padding: 0 15px;
        box-sizing: border-box;
        line-height: 40px;
        text-align: left;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-all;
    }
    .el-input__inner{
        height: 30px !important;
        line-height: 30px !important;
    }
    .el-input__icon{
        line-height: 30px !important;
    }
</style>
